package io.github.talelin.latticy.controller.v1;


import io.github.talelin.latticy.model.CourseDo;
import io.github.talelin.latticy.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 课程信息 前端控制器
 * </p>
 *
 * @author 可
 * @since 2021-07-14
 */
@RestController
@RequestMapping("/v1/course")
public class CourseController {
    @Autowired
    private CourseService courseService;

    @GetMapping("/all")
    public List<CourseDo> getAdv(){
        List<CourseDo> courses = courseService.getCourses();
        return courses;
    }
}

